package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Order;
import com.itheima.view.OrderView;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderDao {
    void add(Order order);

    List<Order> findByCondition(Order order);

    Map findById4Detail(Integer id);

    List<Map> findHotSetmeal();

    Integer findOrderCountAfterDate(String thisWeekMonday);

    Integer findOrderCountByDate(String today);

    List<Integer> findSetmealIdByMemberId(Integer id);

    Integer findVisitsCountAfterDate(String thisWeekMonday);

    Integer findVisitsCountByDate(String today);

    Page<OrderView> findPage(String queryString);

    void delete(Integer id);

    Page<OrderView> findByDate(@RequestParam Date startTime, @RequestParam Date endTime);

    Page<OrderView> findByOrderType(String queryString);

    Page<OrderView> findByOrderStatus(String queryString);

    Page<OrderView> findByOrderString(String queryString);

    Map findById(Integer id);

    List<Integer> findSetmealIdsByOrderId(Integer orderId);

    void edit(Order order);

    void changeOrderStatus(@RequestParam String str,@RequestParam Integer id);

    String findStatus(Integer id);

}
